package com.wu.company.security;

import org.springframework.dao.DataAccessException;
import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import org.springframework.stereotype.Component;

@Component
public class Md5 extends Md5PasswordEncoder {

    private final static String SALT = "123456";

	public String encodePassword(String s, Object obj)
			throws DataAccessException {
		return (super.encodePassword(s, SALT)).toUpperCase();
	}


    @Override
    public boolean isPasswordValid(String encPass, String rawPass, Object salt) {
        return super.isPasswordValid(encPass, rawPass, SALT);
    }
}
